package com.carrot.mq.common;

import lombok.Data;

/**
 * @author 兴趣使然黄小黄
 * @version 1.0
 * @date 2023/8/25 18:12
 * 消费者完整的执行环境
 */
@Data
public class ConsumerEnv {

    // 身份标识
    private String consumerTag;

    // 队列名
    private String queueName;

    // 应答方式
    private boolean autoAck;

    // 回调处理收到的消息
    private Consumer consumer;

    public ConsumerEnv(String consumerTag, String queueName, boolean autoAck, Consumer consumer) {
        this.consumerTag = consumerTag;
        this.queueName = queueName;
        this.autoAck = autoAck;
        this.consumer = consumer;
    }
}
